<!DOCTYPE html>
<html>
<head>
<title>逾期记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">
    //$.fn.iframeWidthResize(640);//页面最小宽度设置
    var dataGrid;
    var winWidth =  800;
    var winHeight = 280;
    var editTitle = "逾期管理";
	var editUrl =  "#";
    var editWinParmeters = "'{0}','"+editTitle+"',"+winWidth+","+winHeight+",'"+editUrl+"'";
    $(function() {
        dataGrid = $('#dataGrid').datagrid({
            url : ' borrowOverdueList.html',
            fit : true,
            fitColumns : true,
            border : false,
            pagination : true,
            idField : 'id',
            pageSize : pageSize,
            pageNums :1,
            pageList : pageList,
            sortName : 'id',
            sortOrder : 'asc',
            checkOnSelect : false,
            selectOnCheck : false,
            nowrap : false,
			singleSelect:true,
            columns : [ [
			  { field: 'id', title: '编号', width: 50,fixed: true, sortable:false },              
              { field: 'userName', title: '借款人', width: 50, sortable:false },
              { field: 'overdueAccount', title: '垫付金额', width: 150, sortable:false },
              { field: 'overdueTime', title: '垫付时间', width: 120, sortable:false, 
            	  	formatter: function(value,row,index){
	  					if (row.repaymentTime){
	  						return getLocalTime(value,4);
	  					} else {
	  						return value;
	  					}
  				  	}  
              },
              { field: 'repaymentAccount', title: '还款金额', width: 150, sortable:false },
              { field: 'repaymentTime', title: '还款时间', width: 120, sortable:false, 
            	  	formatter: function(value,row,index){
	  					if (row.repaymentTime){
	  						return getLocalTime(value,4);
	  					} else {
	  						return value;
	  					}
  				  	}  
              },
              
              ] ],
            onLoadSuccess : function() {
                $('#searchForm table').show();
                parent.$.messager.progress('close');

            },
            onRowContextMenu : function(e, rowIndex, rowData) {
                e.preventDefault();
                $(this).datagrid('unselectAll').datagrid('uncheckAll');
                $(this).datagrid('selectRow', rowIndex);
                $('#menu').menu('show', {
                    left : e.pageX,
                    top : e.pageY
                });
            }
        });
    });
</script>
</head>
<body>
    <div class="easyui-layout" data-options="fit : true,border : false">
        <div data-options="region:'north',title:'查询条件',border:false,collapsible:false" style="height: 185px; overflow: hidden;">
            <form id="searchForm">
              <div class="search_box">借款人：<input type="text" name="username"/></div>
              <div class="search_box">垫付时间：<input type="text" name="startTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>-<input type="text" name="endTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/></div>
              <div class="search_box">
                <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_add',plain:true" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a>
                <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_delete',plain:true" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">清空</a>
              </div>
            </form>
        </div>
        <div data-options="region:'center',border:false">
            <table id="dataGrid"></table>
        </div>
    </div>
    <div id="menu" class="easyui-menu" style="width: 120px; display: none;">        
        <div onclick="$.fn.dataGridOptions.editFun($(this).attr('node-id'),editTitle,winWidth,winHeight,editUrl);" data-options="iconCls:'pencil'">编辑</div>        
    </div>
</body>
</html>
